<!doctype html>
<html xmlns:th="www.thymeleaf.org">
<meta charset="utf-8">
<head th:replace="index::head"></HEAD>
<BODY>
	<header th:replace="index::#ph"></header>
	<!--      导航        -->
	<div style="padding: 3px 8px">
		<span class="layui-breadcrumb">
			<a href="/">作业论坛首页</a>
		</span>
	</div>
	<!--      用户登录表单        -->
	<DIV class="t" style="MARGIN-TOP: 15px" align="center">
		<form class="layui-form layui-main" style="width: 400px">
			<div class="layui-form-item">
				<label class="layui-form-label">账号：</label>
				<div class="layui-input-block">
					<input v-model="user.account" class="layui-input"
						maxlength="12" placeholder="默认账号是：您的中文名">
				</div>
			</div>
			<div class="layui-form-item">
				<label class="layui-form-label">密码：</label>
				<div class="layui-input-block">
					<input v-model="user.pwd" type="password" class="layui-input"
						maxlength="12" placeholder="默认密码是：123456">
				</div>
			</div>
			<div class="layui-form-item" style="float: right;">
				<a href="to_forget" style="margin-right: 10px">忘记密码</a>
				<button @click="login" type="button" class="layui-btn">登录</button>
				<button onclick="window.history.back();" type="button" class="layui-btn">返回</button>
			</div>
			<div style="clear: both;"></div>
		</form>
	</DIV>
	<script type="text/javascript">
	var v = new Vue({
		el : ".t",
		data : { user: {} },
		methods : {
			login(){
				post("login",usp(this.user),res=>{
					location.href="/continue";
				})
			}
		}
	})
	layui.element.render();
	</script>
	<!-- 导入页脚 -->
	<footer th:replace="index::footer"></footer>
</BODY>
<script th:if="${param?.m?.toString()}=='1'">
	alert("密码重置成功，请使用默认密码登录！");
</script>
</HTML>
